<template>
  <div class="big">
   
        <header>
            <img :src="require('../../assets/img/index (3).png')" alt="" class="img1">
            <img :src="require('../../assets/img/index (4).png')" alt="" class="img2">
            <div class="sou">
                <div >
                  <img :src="require('../../assets/img/index(6).png')" alt="" class="img3" @click="search">
                </div>
                <input type="text" placeholder="按内容输入" class="inp1">
            </div>
            <img :src="require('../../assets/img/index (5).png')" alt="" class="img4">
        </header>
        <div>
            <ul class="nav">
                <li>推荐
                    <span></span>
                </li>
                <li>女装
                    <span></span>
                </li>
                <li>鞋包
                    <span></span>
                </li>
                <li>居家
                    <span></span>
                </li>
                <li>母婴
                    <span></span>
                </li>
                <li>美妆
                    <span></span>
                </li>
                <li>
                    <img :src="require('../../assets/img/index (7).png')" alt="">
                    分类
                  <span></span>
                </li>
            </ul>
        </div>
        <div>
             <!-- 轮播图 -->
            <v-banner></v-banner>
        </div>
        <div class="mid1">
            <ul>
                <li>
                    <img :src="require('../../assets/img/index (9).png')" alt="">
                    <p>限时秒杀</p>
                </li>
                <li>
                    <img :src="require('../../assets/img/index (10).png')" alt="">
                    <p>畅销商品</p>
                </li>
                <li>
                    <img :src="require('../../assets/img/index (11).png')" alt="">
                    <p>品质大牌</p>
                </li>
                <li>
                    <img :src="require('../../assets/img/index (12).png')" alt="">
                    <p>小U自营</p>
                </li>
                <li>
                    <img :src="require('../../assets/img/index (13).png')" alt="">
                    <p>积分商城</p>
                </li>
            </ul>
        </div>
        <div class="box">
            <div class="mid3">
                <div>
                    <img :src="require('../../assets/img/index (14).png')" alt="" class="img6">
                </div>
                <div>
                    <img :src="require('../../assets/img/index (15).png')" alt="" class="img7">
                    <img :src="require('../../assets/img/index (16).png')" alt="" class="img8">
                </div>
            </div>
            <div class="mid4">
                <div class="shang">
                    <span>双11尖货预购</span>
                    <span>畅购全球</span>
                </div>
                <div class="xia">
                    <img :src="require('../../assets/img/index (17).png')" alt="">
                    <img :src="require('../../assets/img/index (18).png')" alt="">
                    <img :src="require('../../assets/img/index (19).png')" alt="">
                    <img :src="require('../../assets/img/index (20).png')" alt="">
                </div>
            </div>
            
        </div>
        <div>
              <!-- 商品列表 -->
              <v-list></v-list>
       </div>
       
    </div>
</template>

<script>
// import {reqHomeCate} from "../../http/api"
import vBanner from "./components/banner.vue"
import vList from "./components/list.vue"
export default {
  components:{
    vBanner,vList
  },
  methods:{
    search(){
      this.$router.push('/list')
    }
  },
  // data() {
  //   return {
  //     // 1.初始化数据
  //     cates: [],
  //   };
  // },
  // mounted() {
  //   // 2.一进来就发请求
  //   reqHomeCate().then((res) => {
  //     console.log(res);
  //     this.cates = res.data.list;
  //   });
}
</script>

<style scoped>
* {
  padding: 0;
  margin: 0;
}
.big {
  width: 100vw;
  
  overflow: hidden;
  
}
header {
  width: 100vw;
  height: 0.9rem;
  display: flex;
  justify-content: space-around;
  background: linear-gradient(to bottom, #ff6447 40%, #ff725c 60%);
}
header .img1 {
  width: 0.41rem;
  height: 0.43rem;
  margin-top: 0.35rem;
  margin-left: 0.25rem;
}
header .img2 {
  width: 1.86rem;
  height: 0.49rem;
  margin-top: 0.34rem;
}
header .img4 {
  width: 0.41rem;
  height: 0.44rem;
  margin-top: 0.36rem;
  margin-right: 0.22rem;
}
header .img3 {
  width: 0.32rem;
  height: 0.32rem;
  margin-top: 0.16rem;
  margin-left: 0.23rem;
  position: absolute;
  /* background: url(../img/index/index\ \(6\).png) no-repeat; */
  background-position: 0px 0px;
  background-size: 0.32rem 0.32rem;
}
header .sou {
  width: 3.43rem;
  height: 0.6rem;
  margin-top: 0.24rem;
  display: flex;
  justify-content: flex-start;
}
.inp1 {
  width: 3.43rem;
  height: 0.6rem;
  background: white;
  border-radius: 5px;
  font-size: 0.27rem;
  color: #cacaca;
  text-indent: 0.68rem;
  line-height: 0.6rem;
}
.nav {
  height: 0.76rem;
  background: linear-gradient(to bottom, #ff7864 40%, #ff887c 60%);
  color: white;
  font-size: 0.28rem;
  display: flex;
  justify-content: space-around;
  line-height: 0.74rem;
}
.nav li:nth-of-type(1) {
  font-size: 0.32rem;
}
.nav span {
  display: block;
  width: 0.44rem;
  height: 2px;
  background: white;
  margin: 0 auto;
  display: none;
}
.nav li:hover span {
  display: block;
}
.nav li:nth-of-type(7) {
  width: 4em;
}
.nav li:nth-of-type(7) img {
  width: 0.24rem;
  height: 0.3rem;
  margin-top: 0.23rem;
  margin-left: 5px;
  margin-right: 5px;
  float: left;
}
.img5 {
  width: 6.71rem;
  height: 3.92rem;
  border-radius: 5px;
  margin: 0.2rem 0.4rem;
}
.mid1 ul {
  height: 1.62rem;
  display: flex;
  justify-content: space-around;
}
.mid1 ul li p {
  font-size: 0.2rem;
  line-height: 0.6rem;
}
.mid1 ul li img {
  width: 0.56rem;
  height: 0.64rem;
  margin-left: 0.17rem;
  margin-top: 0.25rem;
}
.box {
  height: 5.2rem;
  background: #f2f2f2;
  overflow: hidden;
}
.box .mid3 {
  height: 3.5rem;
  margin: 0.2rem 0.2rem;
  display: flex;
  justify-content: space-between;
}
.mid3 .img6 {
  width: 3.5rem;
  height: 3.5rem;
}
.mid3 .img7,
.mid3 .img8 {
  width: 3.5rem;
  height: 1.7rem;
}
.mid3 .img7 {
  margin-bottom: 0.12rem;
}
.mid4 {
  width: 7.11rem;
  height: 2.76rem;
  margin: 0 auto;
  background: white;
}
.mid4 .shang {
  display: flex;
  justify-content: space-around;
}
.mid4 .shang span:nth-of-type(1) {
  font-size: 0.35rem;
  color: red;
  line-height: 0.82rem;
}
.mid4 .shang span:nth-of-type(2) {
  font-size: 0.27rem;
  color: #b7b7b7;
  line-height: 0.82rem;
}
.mid4 img {
  width: 1.62rem;
  height: 0.5rem;
}
.mid4 .xia {
  display: flex;
  justify-content: space-around;
}
.bottom {
  height: 1.67rem;
  background: white;
  display: flex;
  justify-content: space-around;
}
.bottom img {
  width: 0.42rem;
  height: 0.44rem;
  margin-left: 2px;
  margin-top: 10px;
}
.bottom a {
  font-size: 0.2rem;
  line-height: 0.5rem;
  color: #c9c9c9;
  display: block;
}
.bottom div:nth-of-type(1) a {
  color: red;
}
.bottom div:nth-of-type(4) a {
  text-indent: 4px;
}
.bottom div:nth-of-type(3) img {
  margin-left: 0.2rem;
}

</style>